var setting = {
	async : {
		enable : true,
		url : "/jxkh/dept/dragtree.json",
		dataType : "json",
		type : 'get',
		autoParam : [ "deptId" ],
		dataFilter : function(treeId, parentNode, childNodes) {
			$.each(childNodes,function(i,node){
				node.drag = true;
			});
			return childNodes.data
		}
	},
	callback : {
		onClick : zTreeOnClick
	},
	data : {
		key:{
			name:"name"
		},
		simpleData : {
			enable : true,
			idKey : "deptId",
			pIdKey : "parentId",
			rootPId : 0
		}
	},
	edit:{
		enable:true,
		showRemoveBtn:false,
		showRenameBtn:false
	}
};
// 树节点Click事件
function zTreeOnClick(event, treeId, treeNode) {
	var action = "dept/getUsers.json";
	$.ajax({
		url : action,
		dataType : "json",
		data : "deptId=" + ("320000"==treeNode.deptId?"320000":treeNode.deptId),
		success : function(data) {
			$("#selected_roles option").remove();
			if (data) {
				$.each(data.users, function(i, user) {
					$("#selected_roles").append(
							"<option style='color:green' value='" + user.policeNum + "'>" + user.name +"【"+treeNode.name+ "】</option>");
				});
			}
		}
	});
}